Optimal. Leaf size=508 \[ -\frac {b g F_1\left (1-p;\frac {1-p}{2},\frac {1-p}{2};2-p;\frac {a+b}{a+b \sin (e+f x)},\frac {a-b}{a+b \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac {b (1-\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {b (1+\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac {1-p}{2}}}{(b c-a d)^2 f (1-p)}+\frac {b g F_1\left (1-p;\frac {1-p}{2},\frac {1-p}{2};2-p;\frac {c+d}{c+d \sin (e+f x)},\frac {c-d}{c+d \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac {d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {d (1+\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}}}{(b c-a d)^2 f (1-p)}+\frac {g F_1\left (2-p;\frac {1-p}{2},\frac {1-p}{2};3-p;\frac {c+d}{c+d \sin (e+f x)},\frac {c-d}{c+d \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac {d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {d (1+\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}}}{(b c-a d) f (2-p) (c+d \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 508, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 2, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.057, Rules used = {3003, 2782}
\begin {gather*} -\frac {b g (g \cos (e+f x))^{p-1} \left (-\frac {b (1-\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {b (\sin (e+f x)+1)}{a+b \sin (e+f x)}\right )^{\frac {1-p}{2}} F_1\left (1-p;\frac {1-p}{2},\frac {1-p}{2};2-p;\frac {a+b}{a+b \sin (e+f x)},\frac {a-b}{a+b \sin (e+f x)}\right )}{f (1-p) (b c-a d)^2}+\frac {b g (g \cos (e+f x))^{p-1} \left (-\frac {d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {d (\sin (e+f x)+1)}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} F_1\left (1-p;\frac {1-p}{2},\frac {1-p}{2};2-p;\frac {c+d}{c+d \sin (e+f x)},\frac {c-d}{c+d \sin (e+f x)}\right )}{f (1-p) (b c-a d)^2}+\frac {g (g \cos (e+f x))^{p-1} \left (-\frac {d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {d (\sin (e+f x)+1)}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} F_1\left (2-p;\frac {1-p}{2},\frac {1-p}{2};3-p;\frac {c+d}{c+d \sin (e+f x)},\frac {c-d}{c+d \sin (e+f x)}\right )}{f (2-p) (b c-a d) (c+d \sin (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2782
Rule 3003
Rubi steps
\begin {align*} \int \frac {(g \cos (e+f x))^p}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx &=\int \left (\frac {b^2 (g \cos (e+f x))^p}{(b c-a d)^2 (a+b \sin (e+f x))}-\frac {d (g \cos (e+f x))^p}{(b c-a d) (c+d \sin (e+f x))^2}-\frac {b d (g \cos (e+f x))^p}{(b c-a d)^2 (c+d \sin (e+f x))}\right ) \, dx\\ &=\frac {b^2 \int \frac {(g \cos (e+f x))^p}{a+b \sin (e+f x)} \, dx}{(b c-a d)^2}-\frac {(b d) \int \frac {(g \cos (e+f x))^p}{c+d \sin (e+f x)} \, dx}{(b c-a d)^2}-\frac {d \int \frac {(g \cos (e+f x))^p}{(c+d \sin (e+f x))^2} \, dx}{b c-a d}\\ &=-\frac {b g F_1\left (1-p;\frac {1-p}{2},\frac {1-p}{2};2-p;\frac {a+b}{a+b \sin (e+f x)},\frac {a-b}{a+b \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac {b (1-\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {b (1+\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac {1-p}{2}}}{(b c-a d)^2 f (1-p)}+\frac {b g F_1\left (1-p;\frac {1-p}{2},\frac {1-p}{2};2-p;\frac {c+d}{c+d \sin (e+f x)},\frac {c-d}{c+d \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac {d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {d (1+\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}}}{(b c-a d)^2 f (1-p)}+\frac {g F_1\left (2-p;\frac {1-p}{2},\frac {1-p}{2};3-p;\frac {c+d}{c+d \sin (e+f x)},\frac {c-d}{c+d \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac {d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}} \left (\frac {d (1+\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac {1-p}{2}}}{(b c-a d) f (2-p) (c+d \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(12568\) vs. \(2(508)=1016\).
time = 54.30, size = 12568, normalized size = 24.74 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.71, size = 0, normalized size = 0.00 \[\int \frac {\left (g \cos \left (f x +e \right )\right )^{p}}{\left (a +b \sin \left (f x +e \right )\right ) \left (c +d \sin \left (f x +e \right )\right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (g\,\cos \left (e+f\,x\right )\right )}^p}{\left (a+b\,\sin \left (e+f\,x\right )\right )\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________